# $Id$
# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=libffi
pkgver=3.2.1
pkgrel=2
pkgdesc='Portable foreign function interface library'
arch=('i686' 'x86_64')
url='http://sourceware.org/libffi/'
license=('MIT')
depends=('glibc')
checkdepends=('dejagnu')
source=(ftp://sourceware.org/pub/libffi/libffi-$pkgver.tar.gz)
sha1sums=('280c265b789e041c02e5c97815793dfc283fb1e6')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --disable-static \
    --enable-pax_emutramp
  make
}

check() {
  make -C $pkgname-$pkgver check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
